<template>
  <el-dialog
    title="审批"
    :visible="approveDialog"
    width="45%"
    @close="$emit('close')"
  >

    <span v-if="isAgree">确定通过这次预约吗</span>
    <template v-else>
      <div style="margin-bottom: 20px;">请填写拒绝的原因:</div>
      <el-input

        v-model="note"
        clear="textarea"
        style="width: 95%;"
        type="textarea"
        :autosize="{ minRows: 4 }"
        placeholder="请输入内容"
      />
    </template>

    <span slot="footer" class="dialog-footer">
      <el-button @click="$emit('close')">取 消</el-button>
      <el-button type="primary" @click="onAgree">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  props: {
    approveDialog: {
      type: Boolean,
      default: false
    },
    isAgree: {
      type: Boolean,
      default: false
    }
    // info:{
    //   type:Object,
    //   default:()=>({})
    // }
  },
  data() {
    return {
      note: ''
    }
  },

  created() {

  },

  methods: {
    onAgree() {
      this.$emit('approve', this.isAgree,this.note)
    }
  }
}
</script>

<style scoped>

</style>
